The MPLS was a protocol initially designed to improve the forwarding rate of a router. However, due to the behavior of the MPLS in the area of Traffic Engineering (TE) and Virtual Private Network (VPN), which are two key technologies in a current IP network, the MPLS has gradually become an important standard for expanding the scalability of the IP network. A key point of the MPLS protocol is the introduction of the concept of “label”, which is both short and easy to process and has no topological information but local meaning. The label is short for an easy processing and can be directly referenced with an index. The label has only local meaning for the convenience of allocation.
The MPLS classifies node devices throughout the network as Label Edge Routers (LERs) and Label Switch Routers (LSRs). The LERs constitute an access part of a MPLS network, while the LSRs constitute a core part of the MPLS network. The LERs initiate or terminate a Label Switch Path (LSP) connection and achieve functions of forwarding conventional IP data packets and forwarding label packets. An ingress LER accomplishes classification and routing of the IP packets, generation of a forwarding table and a LSP table, and mapping of a Forwarding Equivalence Class (FEC) to the label. An egress LER terminates the LSP, and forwards the remaining packets based upon a stripped label. The LSR merely accomplishes the function of forwarding based upon a switch table. In this way, all the sophisticated functions are accomplished within the LER, while the LSR accomplishes only the function of high-speed forwarding.
FIG. 8 shows a network configuration test of the MPLS in the prior art, wherein all interconnecting interfaces between three routers are configured with an enabled Label Distribution Protocol (LDP) and operated with a routing protocol, and an ingress LER and a LSR can obtain an interface network segment route of 202.0.0.0/24 of an egress LER.
The egress LER assigns a label 30 to 202.0.0.0/24 and issues a mapping message to notify the LSR. A label 16 is newly assigned to the FEC: 202.0.0.0/24 on the LSR, and also a mapping message is issued to notify the ingress LER, so that a new correspondence relation is established for the FEC and the label.
For the ingress LER, if there is an incoming IP packet forwarded to the network segment of 202.0.0.0/24, then a Forwarding Information Base (FIB) will be searched, which is stored only on the ingress LER and records information of mapping the FEC to the label. An index of an egress interface can be known from 10.0.0.1, and in turn a specific egress port can be known due to the nature of routers. The label 16 is pushed so as to obtain a MPLS packet which is sent through the egress port corresponding to 10.0.0.1. At this time, the MPLS packet with the label 16 thus comes into being.
For the LSR, if there is an incoming packet with the label 16, then the label 16 within the MPLS packet is replaced by a label 30. The LSR knows the index of the egress interface from 20.0.0.1, and in turn the specific egress port can be known due to the nature of routers. Therefore, if the MPLS packet with the label 16 comes from the port of 10.0.0.2, the packet is subject to the replacement of the label and then sent from the egress port corresponding to 20.0.0.1. At this time, the label value of the MPLS message has already become 30.
For the egress LER, if the packet with the label 30 comes, then the label is stripped so as to obtain an IP packet, which is sent from the egress port corresponding to 202.0.0.0/24.
A conventional router plays various roles of route forwarding, a firewall and broadcast isolating etc within a network. However, within the network after the emergence of the VLAN, communication between logically-divided network segments still requires to be forwarded via a router. Due to a large quantity of data communicated between different VLANs over a LAN, if the router has to perform rooting once for each data packet, the router will become a bottleneck as the quantity of data over the network continuously increases. The three-layer switch technology combines the route technology and the switch technology. After a first data stream is routed, a mapping table is generated for a MAC address and an IP address. When the same data stream passes again, it will pass directly through the second layer instead of being routed again. Thus, it is possible to eliminate a network delay resulted from a route selection made by the router and improve the efficiency of forwarding the data packet. The forwarding of the router employs the mode of a longest match that is a complex implementation, and hence is commonly implemented with software. The route search of the three-layer switch is stream-oriented, which utilizes the CACHE technology and is easy to implement with an Application Specific Integrated Circuit (ASIC), thus possible to greatly reduce the cost and achieve a rapid forwarding.
The emergence of the tree-layer switch technology improves such a situation in which subnets in the network segments have to rely on the management of the router after the division into the network segments within the LAN, and overcomes the above network bottleneck caused by conventional low-speed and complex routers.
For a general router, an interface belongs to a specific physical port, and a relevant MPLS forwarding table item can know a specific physical port simply from a three-layer interface index. Due to intrinsic universality of protocols, many of the protocols in the three-layer switch are ported from a router platform, and thus a MPLS-related VLAN interface is limited to a single-port VLAN, that is, the MPLS feature only supports the single-port VLAN. In a port-based VLAN, several ports in the switch are defined as one VLAN, and sites in the same VLAN have the same network address. In another word, for the three-layer switch, one VLAN may contain a plurality of actual physical ports, and thus it is impossible for the relevant MPLS forwarding table item to directly obtain the specific physical port based upon the three-layer interface index.